﻿<UserControl x:Class="RankModule.Views.RankView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Metro="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="295">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!--ListBox样式定义-->
                <ResourceDictionary Source="pack://application:,,,/Resources;component/Styles/ListBoxStyle.xaml"/>
                <!--TabControl样式定义-->
                <ResourceDictionary Source="pack://application:,,,/Resources;component/Styles/TabControlStyle.xaml"/>
                <!--公共样式定义-->
                <ResourceDictionary Source="pack://application:,,,/Resources;component/Styles/PublicStyle.xaml"/>
                <!--总文字定义-->
                <ResourceDictionary Source="pack://application:,,,/Resources;component/Styles/Themes/Texts.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <XmlDataProvider x:Key="xmlWeek" Source="pack://application:,,,/Games;component/XmlFile/WeekGamesFile.xml" XPath="Data/GameType/Week"/>

        </ResourceDictionary>
    </UserControl.Resources>

    <Border BorderBrush="{StaticResource border}" BorderThickness="1" CornerRadius="3" Background="{StaticResource bg_module}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="25"/>
                <RowDefinition Height="5"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <!--标题栏-->
            <Grid Grid.Row="0" Background="{StaticResource tilebtn_bg}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="30"/>
                    <ColumnDefinition Width="1"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Path Grid.Column="0" Height="14" Width="15" Stretch="Fill" Fill="{StaticResource arrow}" Data="F1 M 19,23L 27,23L 27,31L 19,31L 19,23 Z M 19,34L 27,34L 27,42L 19,42L 19,34 Z M 31,23L 57,23L 57,31L 31,31L 31,23 Z M 19,45L 27,45L 27,53L 19,53L 19,45 Z M 31,34L 57,34L 57,42L 31,42L 31,34 Z M 31,45L 57,45L 57,53L 31,53L 31,45 Z "/>
                <TextBlock Grid.Column="2" Text="{StaticResource list_week}" VerticalAlignment="Center" Foreground="{StaticResource bg_text}"/>
            </Grid>
            <ListBox  Grid.Row="2" ItemContainerStyle="{StaticResource weekliststyle}"
                         ItemsPanel="{StaticResource ItemsPanelTemplate1}"
                         Style="{StaticResource listtemplate}"
                         DataContext="{Binding Source={StaticResource xmlWeek}}" ItemsSource="{Binding}" Background="{x:Null}" BorderThickness="0"/>
        </Grid>
    </Border>
</UserControl>
